using UnityEngine;

public class C_传送区域 : MonoBehaviour
{
	public Transform _PlayerPos;

	public int _传送点ID = -1;

	private string _NextMapName;

	private int _NextMap传送点ID;

	[HideInInspector]
	public bool _IsBoss房;

	[HideInInspector]
	public bool _Boss已击败;

	private void Start()
	{
		string currMapName = MonoSingleton<MySceneManager>.Instance.F_GetCurrSceneName();
		MonoSingleton<MySceneManager>.Instance.F_Get_传送区域_NextMapName(currMapName, _传送点ID, out _NextMapName, out _NextMap传送点ID);
	}

	private void OnTriggerEnter2D(Collider2D collision)
	{
		if ((!_IsBoss房 || _Boss已击败) && collision.tag == "Player")
		{
			MonoSingleton<GameManager>.Instance.F_通过传送区域切换场景(_NextMapName, _NextMap传送点ID);
		}
	}
}
